using Core;

namespace Server;

[PlayCommand(CommandType.Login)]
public sealed class UserLogin : PlayRespAsyncCommand<LoginRequest, LoginReply>
{
    protected override ValueTask<LoginReply> HandlerAsync(PlaySession session, LoginRequest package)
    {
        session.UserId = 20424666;

        return ValueTask.FromResult(new LoginReply
        {
            SuccessFul = true,
            RequestId = package.RequestId,
        });
    }
}